package com.lantosec.hmrp.modules.morality.vo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.lantosec.hmrp.modules.morality.entity.MoralityNote;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评记录 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="MoralityNote对象", description="考评记录")
public class MoralityNoteVO extends BaseVO<MoralityNote> {
    private static final long serialVersionUID = 1L;


    public MoralityNoteVO(MoralityNote entity){
        this.moralityNoteId = entity.getMoralityNoteId();
        this.moralityPlanId = entity.getMoralityPlanId();
        this.moralityTargetId = entity.getMoralityTargetId();
        this.targetDeptId = entity.getTargetDeptId();
        this.targetBranchId = entity.getTargetBranchId();
        this.selfScore = entity.getSelfScore();
        this.selfLevel = entity.getSelfLevel();
        this.rewardScore = entity.getRewardScore();
        this.selfCommitTime = entity.getSelfCommitTime();
        this.learningSituation = entity.getLearningSituation();
        this.selfComment = entity.getSelfComment();
        this.deptScore = entity.getDeptScore();
        this.deptLevel = entity.getDeptLevel();
        this.deptCommitTime = entity.getDeptCommitTime();
        this.deptComment = entity.getDeptComment();
        this.branchScore = entity.getBranchScore();
        this.branchLevel = entity.getBranchLevel();
        this.branchCommitTime = entity.getBranchCommitTime();
        this.branchComment = entity.getBranchComment();
        this.committeeScore = entity.getCommitteeScore();
        this.committeeLevel = entity.getCommitteeLevel();
        this.committeeCommitTime = entity.getCommitteeCommitTime();
        this.committeeComment = entity.getCommitteeComment();
        this.createTime = entity.getCreateTime();
    }

    @Override
    public MoralityNote convertToEntity(){
        return new MoralityNote(this);
    }


    @ApiModelProperty(value = "考评记录ID")
    @TableId(value = "morality_note_id", type = IdType.AUTO)
    private Integer moralityNoteId;

    @ApiModelProperty(value = "考评方案ID")
    private Integer moralityPlanId;

    @ApiModelProperty(value = "被考评人ID")
    private String moralityTargetId;

    @ApiModelProperty(value = "被考评人所属部门ID")
    private String targetDeptId;

    @ApiModelProperty(value = "被考评人所属党支部ID")
    private String targetBranchId;

    @ApiModelProperty(value = "自评得分")
    private BigDecimal selfScore;

    @ApiModelProperty(value = "自评等级")
    private Integer selfLevel;

    @ApiModelProperty(value = "日常加减分")
    private BigDecimal rewardScore;

    @ApiModelProperty(value = "自评提交时间")
    private Date selfCommitTime;

    @ApiModelProperty(value = "学习情况（被考评人填写）")
    private String learningSituation;

    @ApiModelProperty(value = "自评总结")
    private String selfComment;

    @ApiModelProperty(value = "科室评分")
    private BigDecimal deptScore;

    @ApiModelProperty(value = "科室评等级")
    private Integer deptLevel;

    @ApiModelProperty(value = "科室审核时间")
    private Date deptCommitTime;

    @ApiModelProperty(value = "科室评语")
    private String deptComment;

    @ApiModelProperty(value = "党支部评分")
    private BigDecimal branchScore;

    @ApiModelProperty(value = "党支部评等级")
    private Integer branchLevel;

    @ApiModelProperty(value = "党支部审核时间")
    private Date branchCommitTime;

    @ApiModelProperty(value = "党支部评语")
    private String branchComment;

    @ApiModelProperty(value = "考评委员会评分")
    private BigDecimal committeeScore;

    @ApiModelProperty(value = "考评委员会评等级")
    private Integer committeeLevel;

    @ApiModelProperty(value = "考评委员会审核时间")
    private Date committeeCommitTime;

    @ApiModelProperty(value = "考评委员会评语")
    private String committeeComment;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;


    @ApiModelProperty(value = "科室名称")
    private String deptName;
    @ApiModelProperty(value = "姓名")
    private String name;
    @ApiModelProperty(value = "方案名称")
    private String moralityPlanName;
    @ApiModelProperty(value = "考评项目列表")
    private List<MoralityNoteSelfVO> moralityNoteSelfVOList;
    @ApiModelProperty(value = "考评周期名称")
    private String moralityCycleName;
    private Map<String,Object> map;
    @ApiModelProperty(value = "自评等级名称")
    private String selfLevelName;
    @ApiModelProperty(value = "部门等级名称")
    private String deptLevelName;
    @ApiModelProperty(value = "党支部等级名称")
    private String branchLevelName;
    @ApiModelProperty(value = "是否有党支部考评环节（0否，1是）")
    private Integer branchStep;
}
